<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: Spec::Runner::Formatter::HtmlFormatter</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">Spec::Runner::Formatter::HtmlFormatter</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../../../files/vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter_rb.html">
                vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                <a href="BaseTextFormatter.html">
                BaseTextFormatter
               </a>
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">



   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000453">add_example_group</a>&nbsp;&nbsp;
      <a href="#M000462">dump_failure</a>&nbsp;&nbsp;
      <a href="#M000463">dump_summary</a>&nbsp;&nbsp;
      <a href="#M000457">example_failed</a>&nbsp;&nbsp;
      <a href="#M000450">example_group_number</a>&nbsp;&nbsp;
      <a href="#M000451">example_number</a>&nbsp;&nbsp;
      <a href="#M000456">example_passed</a>&nbsp;&nbsp;
      <a href="#M000458">example_pending</a>&nbsp;&nbsp;
      <a href="#M000455">example_started</a>&nbsp;&nbsp;
      <a href="#M000459">extra_failure_content</a>&nbsp;&nbsp;
      <a href="#M000466">global_scripts</a>&nbsp;&nbsp;
      <a href="#M000467">global_styles</a>&nbsp;&nbsp;
      <a href="#M000464">html_header</a>&nbsp;&nbsp;
      <a href="#M000449">method_missing</a>&nbsp;&nbsp;
      <a href="#M000460">move_progress</a>&nbsp;&nbsp;
      <a href="#M000448">new</a>&nbsp;&nbsp;
      <a href="#M000461">percent_done</a>&nbsp;&nbsp;
      <a href="#M000465">report_header</a>&nbsp;&nbsp;
      <a href="#M000452">start</a>&nbsp;&nbsp;
      <a href="#M000454">start_dump</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->
    <div id="includes">
      <h3 class="section-bar">Included Modules</h3>

      <div id="includes-list">
        <span class="include-name">ERB::Util</span>
      </div>
    </div>

    <div id="section">





      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000448" class="method-detail">
        <a name="M000448"></a>

        <div class="method-heading">
          <a href="#M000448" class="method-signature">
          <span class="method-name">new</span><span class="method-args">(options, output)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000448-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000448-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb, line 10</span>
10:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>, <span class="ruby-identifier">output</span>)
11:           <span class="ruby-keyword kw">super</span>
12:           <span class="ruby-ivar">@example_group_number</span> = <span class="ruby-value">0</span>
13:           <span class="ruby-ivar">@example_number</span> = <span class="ruby-value">0</span>
14:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000453" class="method-detail">
        <a name="M000453"></a>

        <div class="method-heading">
          <a href="#M000453" class="method-signature">
          <span class="method-name">add_example_group</span><span class="method-args">(example_group)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000453-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000453-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb, line 38</span>
38:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_example_group</span>(<span class="ruby-identifier">example_group</span>)
39:           <span class="ruby-keyword kw">super</span>
40:           <span class="ruby-ivar">@example_group_red</span> = <span class="ruby-keyword kw">false</span>
41:           <span class="ruby-ivar">@example_group_red</span> = <span class="ruby-keyword kw">false</span>
42:           <span class="ruby-ivar">@example_group_number</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
43:           <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">example_group_number</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
44:             <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;  &lt;/dl&gt;&quot;</span>
45:             <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;&lt;/div&gt;&quot;</span>
46:           <span class="ruby-keyword kw">end</span>
47:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;&lt;div class=\&quot;example_group\&quot;&gt;&quot;</span>
48:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;  &lt;dl&gt;&quot;</span>
49:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;  &lt;dt id=\&quot;example_group_#{example_group_number}\&quot;&gt;#{h(example_group.description)}&lt;/dt&gt;&quot;</span>
50:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">flush</span>
51:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000462" class="method-detail">
        <a name="M000462"></a>

        <div class="method-heading">
          <a href="#M000462" class="method-signature">
          <span class="method-name">dump_failure</span><span class="method-args">(counter, failure)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000462-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000462-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb, line 118</span>
118:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dump_failure</span>(<span class="ruby-identifier">counter</span>, <span class="ruby-identifier">failure</span>)
119:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000463" class="method-detail">
        <a name="M000463"></a>

        <div class="method-heading">
          <a href="#M000463" class="method-signature">
          <span class="method-name">dump_summary</span><span class="method-args">(duration, example_count, failure_count, pending_count)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000463-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000463-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb, line 121</span>
121:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dump_summary</span>(<span class="ruby-identifier">duration</span>, <span class="ruby-identifier">example_count</span>, <span class="ruby-identifier">failure_count</span>, <span class="ruby-identifier">pending_count</span>)
122:           <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">dry_run?</span>
123:             <span class="ruby-identifier">totals</span> = <span class="ruby-value str">&quot;This was a dry-run&quot;</span>
124:           <span class="ruby-keyword kw">else</span>
125:             <span class="ruby-identifier">totals</span> = <span class="ruby-node">&quot;#{example_count} example#{'s' unless example_count == 1}, #{failure_count} failure#{'s' unless failure_count == 1}&quot;</span>
126:             <span class="ruby-identifier">totals</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;, #{pending_count} pending&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">pending_count</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>  
127:           <span class="ruby-keyword kw">end</span>
128:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;&lt;script type=\&quot;text/javascript\&quot;&gt;document.getElementById('duration').innerHTML = \&quot;Finished in &lt;strong&gt;#{duration} seconds&lt;/strong&gt;\&quot;;&lt;/script&gt;&quot;</span>
129:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;&lt;script type=\&quot;text/javascript\&quot;&gt;document.getElementById('totals').innerHTML = \&quot;#{totals}\&quot;;&lt;/script&gt;&quot;</span>
130:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;&lt;/div&gt;&quot;</span>
131:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;&lt;/div&gt;&quot;</span>
132:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;&lt;/body&gt;&quot;</span>
133:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;&lt;/html&gt;&quot;</span>
134:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">flush</span>
135:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000457" class="method-detail">
        <a name="M000457"></a>

        <div class="method-heading">
          <a href="#M000457" class="method-signature">
          <span class="method-name">example_failed</span><span class="method-args">(example, counter, failure)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000457-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000457-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb, line 69</span>
69:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">example_failed</span>(<span class="ruby-identifier">example</span>, <span class="ruby-identifier">counter</span>, <span class="ruby-identifier">failure</span>)
70:           <span class="ruby-identifier">extra</span> = <span class="ruby-identifier">extra_failure_content</span>(<span class="ruby-identifier">failure</span>)
71:           <span class="ruby-identifier">failure_style</span> = <span class="ruby-identifier">failure</span>.<span class="ruby-identifier">pending_fixed?</span> <span class="ruby-value">? </span><span class="ruby-value str">'pending_fixed'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'failed'</span>
72:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;    &lt;script type=\&quot;text/javascript\&quot;&gt;makeRed('rspec-header');&lt;/script&gt;&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@header_red</span>
73:           <span class="ruby-ivar">@header_red</span> = <span class="ruby-keyword kw">true</span>
74:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;    &lt;script type=\&quot;text/javascript\&quot;&gt;makeRed('example_group_#{example_group_number}');&lt;/script&gt;&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@example_group_red</span>
75:           <span class="ruby-ivar">@example_group_red</span> = <span class="ruby-keyword kw">true</span>
76:           <span class="ruby-identifier">move_progress</span>
77:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;    &lt;dd class=\&quot;spec #{failure_style}\&quot;&gt;&quot;</span>
78:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;      &lt;span class=\&quot;failed_spec_name\&quot;&gt;#{h(example.description)}&lt;/span&gt;&quot;</span>
79:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;      &lt;div class=\&quot;failure\&quot; id=\&quot;failure_#{counter}\&quot;&gt;&quot;</span>
80:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;        &lt;div class=\&quot;message\&quot;&gt;&lt;pre&gt;#{h(failure.exception.message)}&lt;/pre&gt;&lt;/div&gt;&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">failure</span>.<span class="ruby-identifier">exception</span>.<span class="ruby-identifier">nil?</span>
81:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;        &lt;div class=\&quot;backtrace\&quot;&gt;&lt;pre&gt;#{format_backtrace(failure.exception.backtrace)}&lt;/pre&gt;&lt;/div&gt;&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">failure</span>.<span class="ruby-identifier">exception</span>.<span class="ruby-identifier">nil?</span>
82:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">extra</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">extra</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;&quot;</span>
83:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;      &lt;/div&gt;&quot;</span>
84:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;    &lt;/dd&gt;&quot;</span>
85:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">flush</span>
86:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000450" class="method-detail">
        <a name="M000450"></a>

        <div class="method-heading">
          <a href="#M000450" class="method-signature">
          <span class="method-name">example_group_number</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
The number of the currently running example_group
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000450-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000450-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb, line 21</span>
21:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">example_group_number</span>
22:           <span class="ruby-ivar">@example_group_number</span>
23:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000451" class="method-detail">
        <a name="M000451"></a>

        <div class="method-heading">
          <a href="#M000451" class="method-signature">
          <span class="method-name">example_number</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
The number of the currently running example (a global counter)
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000451-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000451-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb, line 26</span>
26:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">example_number</span>
27:           <span class="ruby-ivar">@example_number</span>
28:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000456" class="method-detail">
        <a name="M000456"></a>

        <div class="method-heading">
          <a href="#M000456" class="method-signature">
          <span class="method-name">example_passed</span><span class="method-args">(example)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000456-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000456-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb, line 63</span>
63:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">example_passed</span>(<span class="ruby-identifier">example</span>)
64:           <span class="ruby-identifier">move_progress</span>
65:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;    &lt;dd class=\&quot;spec passed\&quot;&gt;&lt;span class=\&quot;passed_spec_name\&quot;&gt;#{h(example.description)}&lt;/span&gt;&lt;/dd&gt;&quot;</span>
66:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">flush</span>
67:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000458" class="method-detail">
        <a name="M000458"></a>

        <div class="method-heading">
          <a href="#M000458" class="method-signature">
          <span class="method-name">example_pending</span><span class="method-args">(example, message, pending_caller)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000458-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000458-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb, line 88</span>
88:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">example_pending</span>(<span class="ruby-identifier">example</span>, <span class="ruby-identifier">message</span>, <span class="ruby-identifier">pending_caller</span>)
89:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;    &lt;script type=\&quot;text/javascript\&quot;&gt;makeYellow('rspec-header');&lt;/script&gt;&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@header_red</span>
90:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;    &lt;script type=\&quot;text/javascript\&quot;&gt;makeYellow('example_group_#{example_group_number}');&lt;/script&gt;&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@example_group_red</span>
91:           <span class="ruby-identifier">move_progress</span>
92:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;    &lt;dd class=\&quot;spec not_implemented\&quot;&gt;&lt;span class=\&quot;not_implemented_spec_name\&quot;&gt;#{h(example.description)} (PENDING: #{h(message)})&lt;/span&gt;&lt;/dd&gt;&quot;</span>
93:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">flush</span>
94:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000455" class="method-detail">
        <a name="M000455"></a>

        <div class="method-heading">
          <a href="#M000455" class="method-signature">
          <span class="method-name">example_started</span><span class="method-args">(example)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000455-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000455-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb, line 59</span>
59:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">example_started</span>(<span class="ruby-identifier">example</span>)
60:           <span class="ruby-ivar">@example_number</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
61:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000459" class="method-detail">
        <a name="M000459"></a>

        <div class="method-heading">
          <a href="#M000459" class="method-signature">
          <span class="method-name">extra_failure_content</span><span class="method-args">(failure)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Override this method if you wish to output extra HTML for a failed spec.
For example, you could output links to images or other files produced
during the specs.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000459-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000459-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb, line 99</span>
 99:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">extra_failure_content</span>(<span class="ruby-identifier">failure</span>)
100:           <span class="ruby-identifier">require</span> <span class="ruby-value str">'spec/runner/formatter/snippet_extractor'</span>
101:           <span class="ruby-ivar">@snippet_extractor</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">SnippetExtractor</span>.<span class="ruby-identifier">new</span>
102:           <span class="ruby-node">&quot;    &lt;pre class=\&quot;ruby\&quot;&gt;&lt;code&gt;#{@snippet_extractor.snippet(failure.exception)}&lt;/code&gt;&lt;/pre&gt;&quot;</span>
103:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000466" class="method-detail">
        <a name="M000466"></a>

        <div class="method-heading">
          <a href="#M000466" class="method-signature">
          <span class="method-name">global_scripts</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000466-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000466-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb, line 189</span>
189:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">global_scripts</span>
190:           <span class="ruby-value str">&quot;function moveProgressBar(percentDone) {\ndocument.getElementById(\&quot;rspec-header\&quot;).style.width = percentDone +\&quot;%\&quot;;\n}\nfunction makeRed(element_id) {\ndocument.getElementById(element_id).style.background = '#C40D0D';\ndocument.getElementById(element_id).style.color = '#FFFFFF';\n}\n\nfunction makeYellow(element_id) {\nif (element_id == \&quot;rspec-header\&quot; &amp;&amp; document.getElementById(element_id).style.background != '#C40D0D')\n{\ndocument.getElementById(element_id).style.background = '#FAF834';\ndocument.getElementById(element_id).style.color = '#000000';\n}\nelse\n{\ndocument.getElementById(element_id).style.background = '#FAF834';\ndocument.getElementById(element_id).style.color = '#000000';\n}\n}\n&quot;</span>
191:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000467" class="method-detail">
        <a name="M000467"></a>

        <div class="method-heading">
          <a href="#M000467" class="method-signature">
          <span class="method-name">global_styles</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000467-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000467-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb, line 215</span>
215:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">global_styles</span>
216:           <span class="ruby-value str">&quot;#rspec-header {\nbackground: #65C400; color: #fff;\n}\n\n.rspec-report h1 {\nmargin: 0px 10px 0px 10px;\npadding: 10px;\nfont-family: \&quot;Lucida Grande\&quot;, Helvetica, sans-serif;\nfont-size: 1.8em;\n}\n\n#summary {\nmargin: 0; padding: 5px 10px;\nfont-family: \&quot;Lucida Grande\&quot;, Helvetica, sans-serif;\ntext-align: right;\nposition: absolute;\ntop: 0px;\nright: 0px;\n}\n\n#summary p {\nmargin: 0 0 0 2px;\n}\n\n#summary #totals {\nfont-size: 1.2em;\n}\n\n.example_group {\nmargin: 0 10px 5px;\nbackground: #fff;\n}\n\ndl {\nmargin: 0; padding: 0 0 5px;\nfont: normal 11px \&quot;Lucida Grande\&quot;, Helvetica, sans-serif;\n}\n\ndt {\npadding: 3px;\nbackground: #65C400;\ncolor: #fff;\nfont-weight: bold;\n}\n\ndd {\nmargin: 5px 0 5px 5px;\npadding: 3px 3px 3px 18px;\n}\n\ndd.spec.passed {\nborder-left: 5px solid #65C400;\nborder-bottom: 1px solid #65C400;\nbackground: #DBFFB4; color: #3D7700;\n}\n\ndd.spec.failed {\nborder-left: 5px solid #C20000;\nborder-bottom: 1px solid #C20000;\ncolor: #C20000; background: #FFFBD3;\n}\n\ndd.spec.not_implemented {\nborder-left: 5px solid #FAF834;\nborder-bottom: 1px solid #FAF834;\nbackground: #FCFB98; color: #131313;\n}\n\ndd.spec.pending_fixed {\nborder-left: 5px solid #0000C2;\nborder-bottom: 1px solid #0000C2;\ncolor: #0000C2; background: #D3FBFF;\n}\n\n.backtrace {\ncolor: #000;\nfont-size: 12px;\n}\n\na {\ncolor: #BE5C00;\n}\n\n/* Ruby code, style similar to vibrant ink */\n.ruby {\nfont-size: 12px;\nfont-family: monospace;\ncolor: white;\nbackground-color: black;\npadding: 0.1em 0 0.2em 0;\n}\n\n.ruby .keyword { color: #FF6600; }\n.ruby .constant { color: #339999; }\n.ruby .attribute { color: white; }\n.ruby .global { color: white; }\n.ruby .module { color: white; }\n.ruby .class { color: white; }\n.ruby .string { color: #66FF00; }\n.ruby .ident { color: white; }\n.ruby .method { color: #FFCC00; }\n.ruby .number { color: white; }\n.ruby .char { color: white; }\n.ruby .comment { color: #9933CC; }\n.ruby .symbol { color: white; }\n.ruby .regex { color: #44B4CC; }\n.ruby .punct { color: white; }\n.ruby .escape { color: white; }\n.ruby .interp { color: white; }\n.ruby .expr { color: white; }\n\n.ruby .offending { background-color: gray; }\n.ruby .linenum {\nwidth: 75px;\npadding: 0.1em 1em 0.2em 0;\ncolor: #000000;\nbackground-color: #FFFBD3;\n}\n&quot;</span>
217:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000464" class="method-detail">
        <a name="M000464"></a>

        <div class="method-heading">
          <a href="#M000464" class="method-signature">
          <span class="method-name">html_header</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000464-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000464-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb, line 137</span>
137:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">html_header</span> 
138:           <span class="ruby-value str">&quot;&lt;?xml version=\&quot;1.0\&quot; encoding=\&quot;UTF-8\&quot;?&gt;\n&lt;!DOCTYPE html\nPUBLIC \&quot;-//W3C//DTD XHTML 1.0 Strict//EN\&quot;\n\&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\&quot;&gt;\n&lt;html xmlns=\&quot;http://www.w3.org/1999/xhtml\&quot; xml:lang=\&quot;en\&quot; lang=\&quot;en\&quot;&gt;\n&lt;head&gt;\n&lt;title&gt;RSpec results&lt;/title&gt;\n&lt;meta http-equiv=\&quot;Content-Type\&quot; content=\&quot;text/html; charset=utf-8\&quot; /&gt;\n&lt;meta http-equiv=\&quot;Expires\&quot; content=\&quot;-1\&quot; /&gt;\n&lt;meta http-equiv=\&quot;Pragma\&quot; content=\&quot;no-cache\&quot; /&gt;\n&lt;style type=\&quot;text/css\&quot;&gt;\nbody {\nmargin: 0;\npadding: 0;\nbackground: #fff;\nfont-size: 80%;\n}\n&lt;/style&gt;\n&lt;/head&gt;\n&lt;body&gt;\n&quot;</span>
139:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000449" class="method-detail">
        <a name="M000449"></a>

        <div class="method-heading">
          <a href="#M000449" class="method-signature">
          <span class="method-name">method_missing</span><span class="method-args">(sym, *args)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000449-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000449-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb, line 16</span>
16:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
17:           <span class="ruby-comment cmt"># no-op</span>
18:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000460" class="method-detail">
        <a name="M000460"></a>

        <div class="method-heading">
          <a href="#M000460" class="method-signature">
          <span class="method-name">move_progress</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000460-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000460-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb, line 105</span>
105:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">move_progress</span>
106:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;    &lt;script type=\&quot;text/javascript\&quot;&gt;moveProgressBar('#{percent_done}');&lt;/script&gt;&quot;</span>
107:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">flush</span>
108:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000461" class="method-detail">
        <a name="M000461"></a>

        <div class="method-heading">
          <a href="#M000461" class="method-signature">
          <span class="method-name">percent_done</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000461-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000461-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb, line 110</span>
110:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">percent_done</span>
111:           <span class="ruby-identifier">result</span> = <span class="ruby-value">100.0</span>
112:           <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@example_count</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>
113:             <span class="ruby-identifier">result</span> = ((<span class="ruby-identifier">example_number</span>).<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-ivar">@example_count</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">*</span> <span class="ruby-value">1000</span>).<span class="ruby-identifier">to_i</span> <span class="ruby-operator">/</span> <span class="ruby-value">10.0</span>
114:           <span class="ruby-keyword kw">end</span>
115:           <span class="ruby-identifier">result</span>
116:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000465" class="method-detail">
        <a name="M000465"></a>

        <div class="method-heading">
          <a href="#M000465" class="method-signature">
          <span class="method-name">report_header</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000465-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000465-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb, line 163</span>
163:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">report_header</span>
164:           <span class="ruby-value str">&quot;&lt;div class=\&quot;rspec-report\&quot;&gt;\n&lt;script type=\&quot;text/javascript\&quot;&gt;\n// &lt;![CDATA[\n\#{global_scripts}\n// ]]&gt;\n&lt;/script&gt;\n&lt;style type=\&quot;text/css\&quot;&gt;\n\#{global_styles}\n&lt;/style&gt;\n\n&lt;div id=\&quot;rspec-header\&quot;&gt;\n&lt;h1&gt;RSpec Results&lt;/h1&gt;\n\n&lt;div id=\&quot;summary\&quot;&gt;\n&lt;p id=\&quot;totals\&quot;&gt;&amp;nbsp;&lt;/p&gt;\n&lt;p id=\&quot;duration\&quot;&gt;&amp;nbsp;&lt;/p&gt;\n&lt;/div&gt;\n&lt;/div&gt;\n\n&lt;div class=\&quot;results\&quot;&gt;\n&quot;</span>
165:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000452" class="method-detail">
        <a name="M000452"></a>

        <div class="method-heading">
          <a href="#M000452" class="method-signature">
          <span class="method-name">start</span><span class="method-args">(example_count)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000452-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000452-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb, line 30</span>
30:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">start</span>(<span class="ruby-identifier">example_count</span>)
31:           <span class="ruby-ivar">@example_count</span> = <span class="ruby-identifier">example_count</span>
32: 
33:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">html_header</span>
34:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">report_header</span>
35:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">flush</span>
36:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000454" class="method-detail">
        <a name="M000454"></a>

        <div class="method-heading">
          <a href="#M000454" class="method-signature">
          <span class="method-name">start_dump</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000454-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000454-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb, line 53</span>
53:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">start_dump</span>
54:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;  &lt;/dl&gt;&quot;</span>
55:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;&lt;/div&gt;&quot;</span>
56:           <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">flush</span>
57:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>